Fix test_identical_args to ignore type annotations in signature comparison - #1421
Merged
synkd merged 1 commit intoJun 2, 2026
Merged
Conversation
…rison requests 2.33.0 added type annotations to its public functions, causing inspect.signature() comparisons to fail since nailgun's wrappers don't replicate those annotations. Strip annotations from both sides before comparing so the test validates parameter names/kinds/defaults only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vsedmik
force-pushed
the
fix-test-identical-args-annotations
branch
from
June 2, 2026 08:45
326a84f to
ec4a5bf
Compare
LadislavVasina1
approved these changes
Jun 2, 2026
LadislavVasina1
left a comment
Contributor
There was a problem hiding this comment.
ACK, CI is passing again with this patch.
synkd
approved these changes
Jun 2, 2026
This was referenced Jun 2, 2026
vsedmik
added a commit
that referenced
this pull request
Jun 3, 2026
…rison (#1421) (#1424) requests 2.33.0 added type annotations to its public functions, causing inspect.signature() comparisons to fail since nailgun's wrappers don't replicate those annotations. Strip annotations from both sides before comparing so the test validates parameter names/kinds/defaults only. (cherry picked from commit cbfb67f) Co-authored-by: Vladimir Sedmik <46570670+vsedmik@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
vsedmik
added a commit
that referenced
this pull request
Jun 3, 2026
…rison (#1421) (#1423) requests 2.33.0 added type annotations to its public functions, causing inspect.signature() comparisons to fail since nailgun's wrappers don't replicate those annotations. Strip annotations from both sides before comparing so the test validates parameter names/kinds/defaults only. (cherry picked from commit cbfb67f) Co-authored-by: Vladimir Sedmik <46570670+vsedmik@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
vsedmik
added a commit
that referenced
this pull request
Jun 3, 2026
…rison (#1421) (#1422) requests 2.33.0 added type annotations to its public functions, causing inspect.signature() comparisons to fail since nailgun's wrappers don't replicate those annotations. Strip annotations from both sides before comparing so the test validates parameter names/kinds/defaults only. (cherry picked from commit cbfb67f) Co-authored-by: Vladimir Sedmik <46570670+vsedmik@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
requests2.33.0 added type annotations (e.g.url: '_t.UriType',**kwargs: 'Unpack[...]') to its public functionstest_identical_argsusedinspect.signature()to compare nailgun's wrappers directly againstrequestsfunctions, which failed because nailgun's wrappers intentionally don't replicate those annotations_strip_annotationshelper that removes annotations from both signatures before comparing, so the test still validates parameter names, kinds, and defaultsTest plan
make testpasses withrequests>=2.33.0🤖 Generated with Claude Code